
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% THIS ROUTINE ADDS THE AUSTRALIAN NEW ZELAND ENVIRONMENT AND CONSERVATION
% COUNCIL (ANZECC) TRIGGER VALUE ON THE CURRENT AXIS.
%
% INPUT: - varname      : name as in awqparameters.xls  
%        - tinme_obs    : array of AWQ observation dates
%                   
% OUTPUT:  - hl2        : line handle 
%        
% Author: Benedicte Pasquer, IMOS/eMII (http://imos.org.au/)
% email: benedicte.pasquer@utas.edu.au
% May 2013   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%CREATES AN ARRAY OF ANZECC VALUE (VARIABLE DEPENDANT)
daterange = date4xlim(1):1:date4xlim(end);
anzecc = ones(length(daterange),1);

switch varname   
    
    case 'TZn'
        anzecc1 = anzecc*15;
        anzecc2 = anzecc*43;
        
    case 'PO4_filt' 
        anzecc = anzecc*5;
    
    case 'DO2_sat'
        anzecc = anzecc*80;
    
    case 'DO2' 
        anzecc = anzecc*6;
    
    case 'NO3_NO2'
        anzecc = anzecc*15;
    
    case 'NH4' 
        anzecc = anzecc*15;
    
    case 'Chla_lab'
        anzecc = anzecc*4;
     
    case 'Chla_lab2' 
        anzecc = anzecc*4;
            
end

if ~strcmp(varname,'TZn')
    hl1 = line(daterange,anzecc);
    set(hl1,'Linestyle','-.','color','k')
else
    hl1 = line(daterange,anzecc1,'Linestyle',':','color','k');
    if max(Ymax)>38
        hl2 = line(daterange,anzecc2);
    end
end